package com.leyou.auth.utils;

import com.leyou.dto.UserDetails;

/**
 * @author 付
 */
public class UserHolder {

    private static final ThreadLocal<UserDetails> tl = new ThreadLocal<>();
    private static final ThreadLocal<String> t2 = new ThreadLocal<>();

    public static void setUser(UserDetails user){
        tl.set(user);
    }

    public static UserDetails getUser(){
        return tl.get();
    }

    public static void userremove(){
        tl.remove();
    }





    public static void setJwt(String jwt){
        t2.set(jwt);
    }

    public static String getJwt(){

        return t2.get();
    }

    public static void jwtremove() {

        t2.remove();
    }
}
